package com.sunda.spmswms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunda.spmswms.entity.WhsStorage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 仓库储位信息表 Mapper 接口
 * </p>
 *
 * @author Wayne
 * @since 2021-03-18
 */
@Mapper
@Component
public interface WhsStorageMapper extends BaseMapper<WhsStorage> {

    /**
     * 根据储位唯一uuid，查询是否有库存；
     * @param storageUuid
     * @return
     */
    @Select("SELECT WSI.UUID, WSI.MATERIAL_NO, WSI.BOX_NOTE FROM WHS_STORAGE_INVENTORY WSI WHERE UUID = #{storageUuid} \n")
    List<Map<String, Object>> checkStorageWithInventory(@Param("storageUuid") String storageUuid);

}
